# Contributor: Kaarle Ritvanen <kunkku@alpinelinux.org>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=kops
pkgver=1.28.4
pkgrel=2
pkgdesc="Kubernetes Operations"
url="https://github.com/kubernetes/kops"
arch="x86_64"
license="Apache-2.0"
depends="kubernetes"
makedepends="go bash"
options="net"
source="$pkgname-$pkgver.tar.gz::https://github.com/kubernetes/kops/archive/v$pkgver.tar.gz"

export GOFLAGS="$GOFLAGS -modcacherw -mod=readonly"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	make kops
}

check() {
	make test
}

package() {
	install -Dm0755 .build/dist/linux/*/kops "$pkgdir"/usr/bin/kops
}

sha512sums="
ca1f63bd1bec167cafa152fd1d510f6d927f301b05f2910e21ca015ded795fc00b7d9344e291acc3d3a6252143823d1adda8855fea52d5d8f5723534a056bb19  kops-1.28.4.tar.gz
"
